<?php
      //引入php文件
 	include 'connect-sql.php';
	   /*
 * 注册接口
 * username
 * password
 * 
 * 返回json数据
 * 
 * */
    $title = $_GET['title'];

	$content = $_GET['content'];
	
	$pid =$_GET['pid'];

	$link = connectSql();
	
	$query = "UPDATE `wqs` SET `title`='$title', `content`='$content' WHERE (`id`='$pid')";
	
	$res = mysqli_query($link, $query);
   
    $arr = [];
	if($res){
		$arr['code']=1;
	}else{
		$arr['code']=0;
	}
	echo json_encode($arr);
?>